import request from '@/utils/request'

// 查询药品预盘点表列表 (分页)
export function selectPageDrugInventoryCheck(query) {
    return request({
        url: '/drug/drugInventoryCheck/selectPage',
        method: 'get',
        params: query
    })
}

// 查询药品预盘点表列表 (不分页)
export function listDrugInventoryCheck(query) {
    return request({
        url: '/drug/drugInventoryCheck/list',
        method: 'get',
        params: query
    })
}

// 查询药品预盘点表详细
export function getDrugInventoryCheck(id) {
    return request({
        url: '/drug/drugInventoryCheck/' + id,
        method: 'get'
    })
}

// 新增药品预盘点表
export function addDrugInventoryCheck(data) {
    return request({
        url: '/drug/drugInventoryCheck',
        method: 'post',
        data: data
    })
}

// 修改药品预盘点表
export function updateDrugInventoryCheck(data) {
    return request({
        url: '/drug/drugInventoryCheck',
        method: 'put',
        data: data
    })
}

// 删除药品预盘点表
export function delDrugInventoryCheck(inventoryNo) {
    return request({
        url: '/drug/drugInventoryCheck/' + inventoryNo,
        method: 'delete'
    })
}

// 库存调整
export function stockAdjust(inventoryNo, orgId) {
    return request({
        url: '/drug/drugInventoryCheck/stockAdjust/' + inventoryNo + "/" + orgId,
        method: 'get'
    })
}

// 按申请单分组查询盘点记录
export function selectGroupInventoryNo(query) {
    return request({
        url: '/drug/drugInventoryCheck/selectGroupInventoryNo',
        method: 'get',
        params: query
    })
}

export function getInventoryCheckList(data) {
    return request({
        url: '/drug/drugInventoryCheck/getInventoryCheckList',
        method: 'post',
        data: data
    })
}